package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SkplAnswerMapper;
import com.ruoyi.system.domain.SkplAnswer;
import com.ruoyi.system.service.ISkplAnswerService;

/**
 * 回答Service业务层处理
 *
 * @author ruoyi
 * @date 2022-06-15
 */
@Service
public class SkplAnswerServiceImpl implements ISkplAnswerService
{
    @Autowired
    private SkplAnswerMapper skplAnswerMapper;

    /**
     * 查询回答
     *
     * @param answerId 回答主键
     * @return 回答
     */
    @Override
    public SkplAnswer selectSkplAnswerByAnswerId(String answerId)
    {
        return skplAnswerMapper.selectSkplAnswerByAnswerId(answerId);
    }

    /**
     * 查询回答列表
     *
     * @param skplAnswer 回答
     * @return 回答
     */
    @Override
    public List<SkplAnswer> selectSkplAnswerList(SkplAnswer skplAnswer)
    {
        return skplAnswerMapper.selectSkplAnswerList(skplAnswer);
    }

    @Override
    public List<SkplAnswer> selectSkplAnswerListByQuestionId(String questionId) {
        return skplAnswerMapper.selectSkplAnswerListByQuestionId(questionId);
    }

    /**
     * 新增回答
     *
     * @param skplAnswer 回答
     * @return 结果
     */
    @Override
    public int insertSkplAnswer(SkplAnswer skplAnswer)
    {
        return skplAnswerMapper.insertSkplAnswer(skplAnswer);
    }

    /**
     * 修改回答
     *
     * @param skplAnswer 回答
     * @return 结果
     */
    @Override
    public int updateSkplAnswer(SkplAnswer skplAnswer)
    {
        return skplAnswerMapper.updateSkplAnswer(skplAnswer);
    }

    /**
     * 批量删除回答
     *
     * @param answerIds 需要删除的回答主键
     * @return 结果
     */
    @Override
    public int deleteSkplAnswerByAnswerIds(String[] answerIds)
    {
        return skplAnswerMapper.deleteSkplAnswerByAnswerIds(answerIds);
    }

    /**
     * 删除回答信息
     *
     * @param answerId 回答主键
     * @return 结果
     */
    @Override
    public int deleteSkplAnswerByAnswerId(String answerId)
    {
        return skplAnswerMapper.deleteSkplAnswerByAnswerId(answerId);
    }




}
